/*入口文件*/
var Vue = require("vue"),
	app = require("./views/app.vue"),
	Vue_router = require("vue-router");
	Vue.use(Vue_router);
	router = new Vue_router();
//路由
router.map({
	"/":{
		component:require("./components/index.vue")
	},
	//404
	'*':{
		component:require("./components/err.vue")
	},
	"/nav":{
		component:require("./components/nav.vue")
	},
	"/login":{
		component:require("./views/user.vue"),
		subRoutes:{
			"/":{
				component:require("./components/login.vue")
			},
			"register":{
				component:require("./components/register.vue")
			}
		}
	}
});
//window.animate = [];
//router.beforeEach(function(transition){
//  if(animate.length > 1 && transition.to.name==animate[animate.length-2]){
//      router.app.animate='back';//返回
//      animate.splice(animate.length-1,1);
//  } else {
//      router.app.animate='next';//前进
//      animate.push(transition.to.name);
//  }
//  transition.next();
//});
router.start(app,'#app');